MySQL ERROR:

Error Number: 2006

Description: MySQL server has gone away

Query: SELECT c.cat_name, c.cat_id, c.cat_image, c.cat_description, c.parent_id, p.cat_id, p.entry_id, c.group_id FROM exp_categories AS c, exp_category_posts AS p WHERE c.cat_id = p.cat_id AND p.entry_id IN ('1687','261','1815','1227','595','797','1396','2263','2804','1032','4512','1509','3476','489','1802','93','494','1705','260','5561','1292','726','84','5563','95','111','899','1007','3002','239','834','1461','747','2300','97','134','502','517','285','96','83','1108','2451','1759','86','275','909','2580','181','1307','1008','8343','100','2409','5562','606','101','694','298','1503','2437','917','936','122','81','3564','1998','1214','3312','330','3084','1031','8347','596','236','1877','3211','1161','1737','3733','1306','85','1411','562','1522','456','1707','87','8346','8344','2895','1657','1767','8345','157','1663','94','89','1430','9804') ORDER BY c.group_id, c.parent_id, c.cat_order